

import 'package:basic_common/common_exports.dart';

import 'model/my_team_list_data.dart';

class MyTeamController extends GetxController {
  final joinList = <JoinTeam>[].obs;
  final managerList = <ManageTeam>[].obs;

  /// 我加入/管理的团队
  void getJoinTeam() async {
    HttpData res = await ApiService().getJointeamList();
    if (res.code == 1) {
      MyTeamListData myTeamData = MyTeamListData.fromJson(res.data);
      
      joinList.value = myTeamData.joinTeam!;
      managerList.value = myTeamData.manageTeam!;
    }
  }

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
    getJoinTeam();
  }
}
